package com.wang.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author :  DongZheng Wang
 * @PROJECT_NAME: springbootTest
 * @date :  2022-10-31 22:49
 **/
//@Component//只有组件才能使用springboot里面强大的功能缺点就是第三方有时候没有这个注解
@ConfigurationProperties(prefix = "mycar")
public class Car {
    private String brand;
    private String model;

    public String getBrand() {
        return brand;
    }

    @Override
    public String toString() {
        return "Car{" +
                "brand='" + brand + '\'' +
                ", model='" + model + '\'' +
                '}';
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }
}
